@extends('admin.layout')
@section('title','积分规则')
@section('css')
    <style>
        #container{width: 1000px;height: 300px;margin-top: 50px}

    </style>

@endsection
@section('body')
    @include('vendor.ueditor.assets')
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>积分规则</legend>
    </fieldset>
    <form class="layui-form" action="{{url('config/interule')}}" method="post" >
        <div class="layui-form-item">
            <label class="layui-form-label">积分规则</label>
            <div class="layui-input-block">
                <script id="container"  name="interule" type="text/plain">{!! $interule->value !!}</script>
            </div>
        </div>
        {{csrf_field()}}
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="submit" style="margin-top: 100px;width: 300px;" class="btn btn-success" value="提交">
            </div>
        </div>

    </form>
@endsection
@section('js')
    <script>
        @if(Session::has('message'))
            layer.msg("{{Session::get("message")}}");
        {{Session::forget('message')}}
        @endif
        <!-- 实例化编辑器 -->
        var ue = UE.getEditor('container');
        ue.ready(function() {
            ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
        });
    </script>

@endsection